Skip to content

Add instance registry with health polling and fleet dashboard#67

Merged
victor-cuevas merged 6 commits intofeat/admin-portalfrom
feat/admin-instance-registry
Mar 17, 2026
Merged

Add instance registry with health polling and fleet dashboard#67
victor-cuevas merged 6 commits intofeat/admin-portalfrom
feat/admin-instance-registry

Conversation

@victor-cuevas
Copy link
Copy Markdown

Summary

  • Backend: instance CRUD API, in-memory store, and periodic health poller that pings registered Chaperone instances for version/status
  • Frontend: fleet dashboard with card and table views, add/edit/remove instance modals with connection testing, and auto-polling for live health updates
  • Extracted UI logic into composables, pure utils, and Pinia stores with full unit test coverage

Test plan

  • Go unit tests for API handlers, store, and poller
  • JS unit tests for composables, stores, utils, and validation
  • Visual QA of dashboard, modals, and confirm dialogs

Instance CRUD API (POST/GET/PUT/DELETE /api/instances) with SQLite store,
background health poller with three-state machine (unknown → healthy →
unreachable after 3 failures, instant recovery), test-connection endpoint,
and Vue frontend with Pinia store, AddInstanceModal, InstanceCard/Table
with density toggle, and staleness detection.
Replace minimal empty state with a guided welcome screen (portal
description + 3-step onboarding flow). Replace window.confirm() with
a ConfirmDialog component for instance removal. Add ghost button
variant for the Remove action.
Validate addresses as strict host:port (rejects :9090, host:abc,
host:0). Cap JSON request bodies at 1 MB. Fix poller failures map
leak for deleted instances. Make Probe() accept *http.Client to avoid
per-call allocation. Extract shared formatTime, isInstanceStale,
STALE_THRESHOLD_MS to utils/instance.js with tests. Fix stale-status
inconsistency between table and card views.
Extract component logic into pure functions (validation, formatting,
filtering), composables (useInstanceForm, usePolling, useConfirmDialog),
and a thin API client so all meaningful frontend logic is testable
without vue-test-utils. 65 tests across 7 files.
Fix 12 lint issues (funlen, rangeValCopy, httpNoBody, gosec, govet
shadow, revive var-naming, unparam) across Go sources. Add gosec G706
exclusion for admin module matching core. Switch Prettier to single
quotes and reformat UI sources.
@victor-cuevas victor-cuevas force-pushed the feat/admin-instance-registry branch from b71ca16 to 90d1f5f Compare March 12, 2026 09:44
@victor-cuevas victor-cuevas force-pushed the feat/admin-instance-registry branch from 90d1f5f to e72fea1 Compare March 12, 2026 09:59
Copy link
Copy Markdown
Member

@arnaugiralt arnaugiralt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, auth is the missing piece, but it's already tracked and will be implemented in the next few weeks

@qarlosh
Copy link
Copy Markdown
Collaborator

qarlosh commented Mar 13, 2026

I found these issues using Copilot, however I think that they are not blocking

@victor-cuevas victor-cuevas merged commit f54619f into feat/admin-portal Mar 17, 2026
13 checks passed
@victor-cuevas victor-cuevas deleted the feat/admin-instance-registry branch March 17, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants